Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / Navbar.js
Last active May 13, 2024 18:00
Un NavBar de Bootstrap rápido para el curso de React de cero a experto
import { Link, NavLink } from 'react-router-dom';
export const Navbar = () => {
return (
<nav className="navbar navbar-expand-sm navbar-dark bg-dark">
<Link
className="navbar-brand"
to="/"
@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@lopezjurip
lopezjurip / script.sh
Created September 25, 2016 02:08
Github full code review
# Create empty branch.
git checkout --orphan review
git rm -rf .
git commit --allow-empty -m "Create empty branch"
git push --set-upstream origin review
# Create `project` branch from `master` current state.
git checkout -b project
git merge master --allow-unrelated-histories
git push --set-upstream origin project
@Intyre
Intyre / Wahoo_Elemnt.md
Last active May 13, 2024 17:56
Wahoo Elemnt - Tips, tricks and custom images
@mbinna
mbinna / effective_modern_cmake.md
Last active May 13, 2024 17:54
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@cliffrowley
cliffrowley / STREAMDECK_HID.md
Last active May 13, 2024 17:49
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@Kautenja
Kautenja / tar-progress.md
Last active May 13, 2024 17:46
one-liners for using tar with gzip and pv for a progress bar

Compress

tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>

where:

  • `` is the root-mounted (i.e. starts with /) path to the files
@fhuitelec
fhuitelec / check_file_exists.zsh
Created November 25, 2017 06:11
[Check file exists] Cheatsheet to check if file exists #zsh #shell #cheatsheet
#!/usr/bin/env zsh
#
# Check file exists
#
if [ ! -f /tmp/foo.txt ]; then
echo "File not found!" >&2
exit 1
fi
@crazy-max
crazy-max / Caddy.env
Last active May 13, 2024 17:45
Proxmox web interface through Caddy as reverse proxy with Let's Encrypt
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_HOSTED_ZONE_ID=